import _ from 'lodash'
import Moment from 'moment'

const filterMixins = {
  dateFormat(value, format) {
    if (!_.isDate(new Date(value))) {
      return '日期错误'
    }
    return Moment(value).format(format)
  },
};

export default {
  filters: filterMixins,
}
